#include "../func.h"

void* thread_func(void* p)
{
    while(1)
    {
        printf("I am child thread\n");
        sleep(1);
    }
}

int main()
{
    pthread_t pthid;
    int ret;
    ret = pthread_create(&pthid, NULL, thread_func, NULL);
    if (ret != 0)
    {
        printf("pthread_create failed, ret = %d\n", ret);
        return -1;
    }
    while(1)
    {
        printf("I am main thread\n");
        sleep(1);
    }
}
